//事件监听
var main=document.querySelector("#web_bg");
var kkobj=document.querySelector(".kk");
var  yulanobj=document.querySelector(".yulan");

function fn(){
     main.onclick=function (e) {
         console.log(2);
        var ev = ev || window.event;
        var target = ev.target || ev.srcElement;
        var nn=document.querySelector("#"+target.id);
        var yulanobj=document.querySelector(".yulan");

        console.log(e);
        var classname=target.className;
            var mr=classname.split(" ")[0];
            var id=classname.split(" ")[2].substr(1,5);
            var str="";
            switch (mr) {
                case "gq": str="中国枸杞之乡";
                    break;

                case "sleep": str="中国滩羊肉之乡";
                    break;

                case "gancao": str="中国甘草之乡";
                    break;

                case "gua" : str="中国硒砂瓜之乡";
                    break;

                case "mls": str="中国马铃薯之乡";
                    break;

                case "ptj": str="宁夏贺兰山东麋葡萄酒";
                    break;

                case "dm"  : str="宁夏大米";
                    break;

                case "cx"  : str="宁夏菜心";
                    break;

                case "milk"  : str="宁夏牛奶";
                    break;

                case "sc"  : str="六盘山冷凉蔬菜";
                    break;

                case "hn"  : str="固原黄牛";
                    break;

                case "hc"  : str="盐池黄花菜";
                    break;

                case "apple"  : str="沙坡头苹果";
                    break;

                case "dz"  : str="灵武长枣";
                    break;

                case "fm" : str="泾源蜂蜜";
                    break;

                case "yu" : str="淡水鱼";
                    break;

                case "zl" : str="小杂粮";
                    break;

                case "yl" : str="油料";
                    break;

                case "zf" : str="中蜂";
                    break;

                case "zq" : str="种禽";
                    break;
            }
            yulanobj.style.display="block";
            var imgURl=document.querySelector(".imgs")
            var line=document.querySelector(".liname");

            line.innerHTML=str;
            imgURl.src=target.src;
            nn.style.transform='scale(5)';
            setTimeout(function () {
                nn.style.transform='scale(1)';
            },300);
            //页面跳转
            yulanobj.onclick=function () {
                //window.location=""+mr+".html";
                window.location="https://m.zmlxj.com/#/parkPhoto/LabelDetail?id="+id+"&park_id=1&title=&park_logo=&token=zmlxj_"
            };
        }





}

fn();



$(document).ready(function () {


   $(".footerlei").click(function () {

       var caseId=$(this).attr("id");
       $(".nn").removeClass();
       $(".footerlei").removeClass("active1");
       $("#"+caseId).addClass("active1");
       $("#b1"+caseId).show().siblings(".footercontent").hide();
   });
   $(".footercontent ul").click(function () {

       $(".yulan").css("display","none");
       $("#web_bg img").css("display","none");
       var caId=$(this).attr("id");
       $("."+caId).css({"display":"block","transform":"scale(2)"});
       $(".footercontent").css({"display":"none"});

   })
    var height=window.screen.availHeight;
   var iiobgj=document.querySelector("#web_bg");
   iiobgj.style.height=height+"px";
    window.onresize=function () {


    }




});